import {Routes, RouterModule} from '@angular/router';
import {ModuleWithProviders} from '@angular/core';
import {TemplateComponent} from './template.component';
import {ListComponent} from './list/list.component';
import {AddComponent} from './add/add.component';
import { EditComponent } from './edit/edit.component';
import {SpecComponent} from './spec/spec.component';

export const routes: Routes = [
  {
    path: '',
    component: TemplateComponent,
    children: [{
      path: '',
      component: ListComponent,
      pathMatch: 'full',
      redirectTo: '/member/template/list',
    }, {
      path: 'list',
      component: ListComponent
    }, {
      path: 'add',
      component: AddComponent
    }, {
      path: 'edit/:id',
      component: EditComponent
    }, {
      path: 'spec',
      component: SpecComponent
    }]
  }
];


export const routing: ModuleWithProviders = RouterModule.forChild(routes);
